package de.guidoludwig.jtm.domain;
/* $Id: MediaType.java,v 1.3 2006/09/15 14:10:54 gigabass Exp $
*
* Copyright (c) Guido Ludwig. All rights reserved.
* Use is subject to license terms.
*/


/**
 * New Media concept, unfinished
 * 
 * @author <a href="mailto:jtrade@gigabss.de">Guido Ludwig</a>
 * @version $Revision: 1.3 $
 */
public enum MediaType  {

    EMPTY(null, false, false, false, false),
    CDR("Audio CD", true, false, false, false),
    VCD("Video CD", false, true, false, true),
    DVD("DVD", false, true, false, true),
    VHS("Analog Video Tape", false, true, false, false),
    XVCD("Extended Video CD", false, true, true, true),
    SVCD("Super Video CD", false, true, true, true),
    MP2("DVB Stream MP2 Files", true, false, true, false),
    MP3("MP3 Files", true, false, true, false),
    MPG("MPG Files", false, true, true, false),
    OGG("OGG Files", true, false, true, false),
    WMA("Windows Media (Audio)", true, false, true, false),
    WMV("Windows Media (Video)", false, true, true, false),
    SHN("SHN Files", true, false, false, false),
    FLAC("FLAC Files", true, false, false, false),
    RA("Real Audio", true, false, true, false),
    RV("Real Video", false, true, true, false),
    TAPE("Audio Cassette", true, false, true, false),
    DAT("Audio DAT Tape", true, false, true, false);
        
    private String name;
    private boolean audio;
    private boolean video;
    private boolean compressed;
    private boolean digitalVideo;
    
    private MediaType(String n, boolean audio, boolean video, boolean compressed, boolean digitalVideo) {
        name = n;
        this.audio = audio;
        this.video = video;
        this.compressed = compressed;
        this.digitalVideo = digitalVideo;
    }

    /**
     * @return Returns the audio.
     */
    public boolean isAudio() {
        return audio;
    }

    /**
     * @return Returns the video.
     */
    public boolean isVideo() {
        return video;
    }

    /**
     * @return Returns the name.
     */
    public String getName() {
        return name;
    }

    public boolean isCompressed() {
        return compressed;
    }
    public boolean isDigitalVideo() {
        return digitalVideo;
    }    
   
    // FIXME : better use formatter
    @Override
	public String toString() {
        return name() + " " + getName();
    }
}
